﻿using System;
using XSTDZ.ERP.Application.DataContracts;
using System.Collections.Generic;

namespace XSTDZ.ERP.Application
{
    /// <summary>
    /// 商品入库服务
    /// </summary>
    public interface IProductInService
    {
        #region 入库订单
        Guid AddProductInBill(ProductInBillDto productInBillDto);
        Guid AddProductInBill(Guid productInBillId, IEnumerable<ProductInBillDetailDto> productInBillDetailDtos);
        Guid AddProductInBill(ProductInBillDto productInBillDto, IEnumerable<ProductInBillDetailDto> productInBillDetailDtos);
        void UpdateProductInBill(ProductInBillDto productInBillDto);
        void UpdateProductInBill(Guid productInBillId, IEnumerable<ProductInBillDetailDto> productInBillDetailDtos);
        Guid UpdateProductInBill(ProductInBillDto productInBillDto, IEnumerable<ProductInBillDetailDto> productInBillDetailDtos);
        void ConvertProductInBillDeleteState(Guid productInBillId);
        void ConvertProductInBillDeleteState(Guid productInBillId, IEnumerable<Guid> productInBillDetailIds);
        ProductInBillDto GetProductInBill(Guid productInBillId);
        IEnumerable<ProductInBillDto> GetProductInBills(int pageIndex, int pageSize);
        IEnumerable<ProductInBillDto> GetProductInBills(out int recordCount,int pageIndex, int pageSize,string orgCode);
        #endregion
        #region 入库订单明细
        void AddProductInBillDetail(Guid productInBillId, ProductInBillDetailDto productInBillDetailDto);
        void UpdateProductInBillDetail(Guid productInBillId, IEnumerable<ProductInBillDetailDto> productInBillDetailDtos);
        ProductInBillDetailDto GetProductInBillDetail(Guid productInBillDetailId);
        IEnumerable<ProductInBillDetailDto> GetProductInBillDetails(Guid productInBillId);
        //void UpdateProductInBillDetail(ProductInBillDetailDto productInBillDetailDto);
        //void ConvertProductInBillDetailDeleteState(Guid productInBillDetailId);
        //ProductInBillDetailDto GetProductInBillDetail(Guid productInBillDetailId);
        //IEnumerable<ProductInBillDetailDto> GetProductInBillDetails(Guid productInBillId);
        //IEnumerable<ProductInBillDetailDto> GetProductInBillDetails(int pageIndex, int pageSize);
        #endregion
        #region 导入收货确认的发货单
        void ImportConfirm(IEnumerable<Guid> deliveryIds);
        //更新库存
        void ConfirmUpdateStock(Guid billId);
        #endregion
        #region 其它
        /// <summary>
        /// 获得当前入库单单号的最大单号
        /// </summary>
        /// <returns></returns>
        string GetMaxBillNo();
        #endregion
    }
}
